package com.dlc.hardwareprotocol.serialport.command.recv;

import android.os.SystemClock;

import com.dlc.hardwareprotocol.serialport.command.RecvCommand;


public class RecvBase implements RecvCommand {
    private final byte[] mAllPack;
    protected final byte[] data;
    private final int cmd;
    private final long mRecvTime;

    public RecvBase(byte[] mAllPack, byte[] data, int cmd) {
        this.mAllPack = mAllPack;
        this.data = data;
        this.cmd = cmd;
        this.mRecvTime = SystemClock.uptimeMillis();
    }

    @Override
    public int getCmd() {
        return cmd;
    }

    public byte[] getData() {
        return data;
    }

    @Override
    public long getRecvTime() {
        return mRecvTime;
    }

    @Override
    public byte[] getAllPack() {
        return mAllPack;
    }
}
